#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time       : 2025/8/7 14:27
# @Author     : cfg
# @File       : font.py
# @Software   : PyCharm
# @Description: The description of this file.
import os
import sys

import pygame
pygame.init()


# 资源文件目录访问
def source_path(relative_path):
    # 是否Bundle Resource
    if getattr(sys, 'frozen', False):
        base_path = sys._MEIPASS
    else:
        base_path = os.path.abspath(".")
    return os.path.join(base_path, relative_path)


project_path = source_path('')


class Font:
    title = pygame.font.Font(project_path + "fonts/simhei.ttf", 40)
    common_text = pygame.font.Font(project_path + "fonts/simhei.ttf", 22)
    message = pygame.font.Font(project_path + "fonts/simhei.ttf", 18)
    menu = pygame.font.Font(project_path + "fonts/simkai.ttf", 30)
    lr = pygame.font.Font(project_path + "fonts/simkai.ttf", 15)
    tips = pygame.font.Font(project_path + "fonts/simkai.ttf", 15)